package com.zhongzhi.common;

import java.util.HashMap;

import com.zhongzhi.springboot.pojo.Equipment;
import com.zhongzhi.springboot.pojo.EquipmentShow;
import com.zhongzhi.springboot.pojo.Station;
import com.zhongzhi.springboot.pojo.StationShow;

import lombok.Data;
import lombok.ToString;
/**
 * 
 * @author Administrator
 *此对象为页面结构中的设备对象
 */
@ToString
public class Plc {
	//plc连接状态
	private  Boolean PlcState;
	//测试信息集合//工位id,工位测试信息
	private  HashMap<Integer,GrabDetail> map = new HashMap<Integer, GrabDetail>();
	//数据暂存集合
	private  HashMap<Integer,Double> sjTemData =new HashMap<Integer, Double>();
	//工位信息集合
	private  HashMap<Integer,StationShow> stTemData =new HashMap<Integer, StationShow>();
	private  Integer id;
	//设备名称
	private  String plcName;
	//地址
	private  String host;
	//端口
	private  Integer port;
	//上位机ip
	private  Integer upper;
	//设备描述
	private  String remarks;
	public Boolean getPlcState() {
		return PlcState;
	}
	public void setPlcState(Boolean plcState) {
		PlcState = plcState;
	}
	public HashMap<Integer, GrabDetail> getMap() {
		return map;
	}
	public void setMap(HashMap<Integer, GrabDetail> map) {
		this.map = map;
	}
	public HashMap<Integer, Double> getSjTemData() {
		return sjTemData;
	}
	public void setSjTemData(HashMap<Integer, Double> sjTemData) {
		this.sjTemData = sjTemData;
	}
	public HashMap<Integer, StationShow> getStTemData() {
		return stTemData;
	}
	public void setStTemData(HashMap<Integer, StationShow> stTemData) {
		this.stTemData = stTemData;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getPlcName() {
		return plcName;
	}
	public void setPlcName(String plcName) {
		this.plcName = plcName;
	}
	public String getHost() {
		return host;
	}
	public void setHost(String host) {
		this.host = host;
	}
	public Integer getPort() {
		return port;
	}
	public void setPort(Integer port) {
		this.port = port;
	}
	public Integer getUpper() {
		return upper;
	}
	public void setUpper(Integer upper) {
		this.upper = upper;
	}
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	public Plc(Boolean plcState, HashMap<Integer, GrabDetail> map, HashMap<Integer, Double> sjTemData,
			HashMap<Integer, StationShow> stTemData, Integer id, String plcName, String host, Integer port, Integer upper,
			String remarks) {
		super();
		PlcState = plcState;
		this.map = map;
		this.sjTemData = sjTemData;
		this.stTemData = stTemData;
		this.id = id;
		this.plcName = plcName;
		this.host = host;
		this.port = port;
		this.upper = upper;
		this.remarks = remarks;
	}
	public Plc() {
		super();
	}
	public Plc(Boolean plcState, Integer id, String plcName, String host, Integer port, Integer upper, String remarks) {
		super();
		PlcState = plcState;
		this.id = id;
		this.plcName = plcName;
		this.host = host;
		this.port = port;
		this.upper = upper;
		this.remarks = remarks;
	}
	public Plc(EquipmentShow equipment) {
		this.id = equipment.getId();
		this.plcName = equipment.getPlcName();
		this.host = equipment.getHost();
		this.port = equipment.getPort();
		this.upper = equipment.getComputersId();
		this.remarks = equipment.getRemarks();
	}
}
